home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c++ / 60 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  4.1 KB

  1. From: James Kanze US/ESC 60/3/141 #40763 <kanze@lts.sel.alcatel.de>
  2. Message-ID: <9601171106.AA12639@lts.sel.alcatel.de>
  3. X-Original-Date: Wed, 17 Jan 96 12:06:51 +0100
  4. Path: in2.uu.net!bounce-back
  5. Date: 18 Jan 96 02:02:11 GMT
  6. Approved: fjh@cs.mu.oz.au
  7. Organization: -
  8. In-Reply-To: clamage@Eng.Sun.COM's message of 16 Jan 1996 10:43:59 PST
  9. Newsgroups: comp.std.c++
  10. Subject: Re: STL still in standard
  11. References: <4dd7on$djk@rc1.vub.ac.be> <4dgrb4$a2e@engnews1.Eng.Sun.COM>
  12. X-Auth: PGPMoose V1.1 PGP comp.std.c++
  13.     iQBFAgUBMP2qOOEDnX0m9pzZAQFgdgF6At59nRlH2pni3s1T0vjQUlaaNmYY15PF
  14.     VsmVbh44Tq1Lpo+BJMOna5qFLEIg4+JB
  15.     =GSPF
  16.  
  17. In article <4dgrb4$a2e@engnews1.Eng.Sun.COM> clamage@Eng.Sun.COM
  18. (Steve Clamage) writes:
  19.  
  20. |> In article djk@rc1.vub.ac.be, Alain Dresse <adresse@ulb.ac.be> writes:
  21. |> >I have heard about considerations on removing STL from the
  22. |> >C++ standard because it is error prone.
  23.  
  24. |> >Could anyone confirm or deny this information ?
  25.  
  26. |> False.
  27.  
  28. |> The C++ Committee has been unanimous (or nearly so) in its acceptance
  29. |> of STL. I do not believe there is any chance it will be dropped.
  30.  
  31. That's what I want to hear.
  32.  
  33. I'm curious in what way the STL is error prone.
  34.  
  35. From a user point of view, it is probably more error prone than
  36. whatever class library your are used to using, because you are used to
  37. the other library, and not STL.  The fact that it will be a standard
  38. library, and that everyone will use it, will mean that in a couple of
  39. years, just the opposite will be true.
  40.  
  41. The currently available implemention (from HP) is somewhat error
  42. prone, and cannot be used in the presence of exceptions.  Given the
  43. price that HP (a commercial firm, in business to make money) asks for
  44. it, however, I hardly think anyone has a right to complain.  Their
  45. implementation does offer a sound basis for a more solid
  46. implementation, and has allowed many people to become familiar with
  47. the idioms faster than would have otherwise been possible.
  48.  
  49. Safer implementations are possible; Cay Horstman, I think, has already
  50. made one available.  Exception safe implementations are also possible.
  51. (It is also an open question how far one wants to go here.  I would
  52. accept, for example, that an exception from the comparison function
  53. when inserting into a map results in undefined behavior; if comparison
  54. can throw an exception, an STL map is perhaps not the appropriate
  55. container.)
  56.  
  57. If the complaint is based on the fact that the Draft Standard is not
  58. particularly clear, well, STL was added just before the Draft was made
  59. public, so the text was added very hurriedly.  The (not officially
  60. public) September draft is already significantly better; given the
  61. quality of the people working on it, and the amount of work they are
  62. investing, I see no reason to doubt that the final version will be OK.
  63. (It will *NOT* be a tutorial, of course.  That is not the purpose of
  64. an ISO standard.)  
  65.  
  66. My pet peave, of course, is that there is no hint in the current
  67. version as to the requirements of the template classes/functions when
  68. the instantiation classe throws an exceptions, but I'm sure that this
  69. is on someone's work list, somewhere, and will be addressed in the
  70. final standard.  (In the meantime, I'd love a hint as to what
  71. direction this will take.  Will an exception from a comparison
  72. function cause undefined behavior?)
  73.  
  74. There is a lack of tutorial material at present, but this is only
  75. because the library is new.  I expect that new C++ tutorials will
  76. present vector<T> instead of the classical C style arrays, for
  77. example.  (And you surely don't mean to imply that vector<T> is more
  78. error prone than the C style arrays, do you?)
  79.  
  80. So why would anyone want the C++ standard *not* to include STL?
  81.  
  82. --
  83. James Kanze         Tel.: (+33) 88 14 49 00        email: kanze@gabi-soft.fr
  84. GABI Software, Sarl., 8 rue des Francs-Bourgeois, F-67000 Strasbourg, France
  85. Conseils, itudes et rialisations en logiciel orienti objet --
  86.                 -- A la recherche d'une activiti dans une region francophone
  87. ---
  88. [ comp.std.c++ is moderated.  Submission address: std-c++@ncar.ucar.edu.
  89.   Contact address: std-c++-request@ncar.ucar.edu.  The moderation policy
  90.   is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]
  91.